<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<li>aaa</li>
<li>bbb</li>
<li>ccc</li>
<script>
    var lis = document.getElementsByTagName('li');
    console.log(lis);
    for(var i in lis){
        if (lis.hasOwnProperty(i)){
            console.log(i);
        }

    }

</script>
</body>
</html>